// Copyright (c) 2014 Jonathan Magnan (http://jonathanmagnan.com/).
// All rights reserved (http://zzzproject.com/icon-library/).
// Licensed under MIT License (MIT) (https://ziconlibrary.codeplex.com/license).

// All icons are licensed under a Creative Commons Attribution 3.0 License.
// http://creativecommons.org/licenses/by/3.0/us/
// Copyright 2009-2013 FatCow Web Hosting. All rights reserved.
// http://www.fatcow.com/free-icons


using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace Z.IconLibrary.FarmFresh16
{
    public static class PageExtensions
    {
        /// <summary>
        ///     A Page extension method that add the stylesheet to the page header.
        /// </summary>
        /// <param name="this">The @this to act on.</param>
        public static void AddIconStyleSheet(this Page @this)
        {
            var link = new HtmlGenericControl("link");
            link.Attributes.Add("rel", "stylesheet");
            link.Attributes.Add("type", "text/css");
            link.Attributes.Add("href", "Z.IconLibrary.FarmFresh16.axd?f=resources.Z.IconLibrary.FarmFresh16.css");
            @this.Header.Controls.Add(link);
        }
    }
}